﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using PBOffice.DAL;
using PBOffice.BLL;

public partial class NewsManageModule_newsManage : System.Web.UI.Page
{
    
    protected void Page_Load(object sender, EventArgs e)
    {
        //页面首次加载
        if(!IsPostBack)
        {
            ddlNewsType.SelectedIndex = 0;    //新闻类型默认选中第一项           
        }
        lblNone.Visible = false;
    }
    //查询按钮单击事件
    protected void btnView_Click(object sender, EventArgs e)
    {
        int newsTypeNo =Convert.ToInt32( ddlNewsType.SelectedValue.ToString());
        NewsManager nm=new NewsManager();
        List<v_NewsInfo> newsList = nm.ShowNewsInfo(newsTypeNo);
        if (newsList.Count() < 1)
            lblNone.Visible = true;
        else
            lblNone.Visible = false;
        
    }
}